package net.anzhuo.entity.db.syncdata;

import java.util.ArrayList;
import java.util.List;



public class PageUtilsCourtCaseSource {
		
		public int pageSize=15;
		public int pageIndex=1;
		public int pageTotalSize=0;
		
		public int start=0;
		public int end=0;
		public List<CourtCaseResult> result=new ArrayList<CourtCaseResult>();
		public PageUtilsCourtCaseSource(List<CourtCaseResult> list,int pageIndex,int pageSize)
		{
			result=new ArrayList<CourtCaseResult>();
		  pageTotalSize=((list.size()-1)/pageSize+1);	
		  this.pageIndex=pageIndex;
		  this.pageSize=pageSize;
		  start=((this.pageIndex-1)*pageSize);
		  end=(this.pageIndex*pageSize-1)<(list.size()-1)?(this.pageIndex*pageSize-1):(list.size()-1);
		  for(int i=start;i<=end;i++)
		  {
			  result.add(list.get(i));
		  }
		  
		}

	
}
